package cn.diancan.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

/**
 * 货品
 * @author Sky 
 */
@Entity
@Table(name="Goods",uniqueConstraints = {@UniqueConstraint(columnNames={"goodsNumber","brandId"})}) 
public class Goods {
    
    private Long id;
    private Long brandId; //Brand 外键
    
    private Long firstGoodsCategoryId;
    private Long secondGoodsCategoryId;
    
    private Long goodsCategoryId; //产品分类
    private String goodsCategoryPath;
    
    
    private String goodsNumber; //唯一  ==Goods_No
    private String goodsName;//Goods_Name
    private String goodsImage; //图片
    private String goodsDescription;
    private String createTime;
    
    private String goodsBarCode; //条码 --前面一段
    
    
    //货品的价格.
    private String rangeStr; 
    private Double tagPrice;    //吊牌价
    private Double retailPrice;  //销售价格  
    private String unit;
    
    
    private String year; //年份
    private String season; //季节
    private Integer applySex; // 0 女  1 男   2 全部
    private Double wholeSalePrice;//
    private String goodsRemark; 
    
    private Integer totalStockCount; //总库存
    private Integer indexNo;
    private Integer isDelete;
    private long lastUpdateTimeStamp;//真实数据需要
    private Integer version;
    
    public long getLastUpdateTimeStamp() {
		return lastUpdateTimeStamp;
    }
    public void setLastUpdateTimeStamp(long lastUpdateTimeStamp) {
		this.lastUpdateTimeStamp = lastUpdateTimeStamp;
    }
    
    @Version
    @Column(name="OPTLOCK",columnDefinition="int(11) DEFAULT 0")
    public Integer getVersion() {
        return version;
    }
    public void setVersion(Integer version) {
        this.version = version;
    }
    

    
    @Id
    @GeneratedValue
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    @Column(columnDefinition="VARCHAR(32)")
    public String getGoodsNumber() {
        return goodsNumber;
    }
    public void setGoodsNumber(String goodsNumber) {
        this.goodsNumber = goodsNumber;
    }
    public Long getBrandId() {
        return brandId;
    }
    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }
    
    public Long getGoodsCategoryId() {
        return goodsCategoryId;
    }
    public void setGoodsCategoryId(Long goodsCategoryId) {
        this.goodsCategoryId = goodsCategoryId;
    }

    public String getGoodsName() {
        return goodsName;
    }
    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }
    public String getGoodsDescription() {
        return goodsDescription;
    }
    public void setGoodsDescription(String goodsDescription) {
        this.goodsDescription = goodsDescription;
    }
    public String getCreateTime() {
        return createTime;
    }
    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
    public Integer getIsDelete() {
        return isDelete;
    }
    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }
    public Integer getTotalStockCount() {
        return totalStockCount;
    }
    public void setTotalStockCount(Integer totalStockCount) {
        this.totalStockCount = totalStockCount;
    }
    
    public String getGoodsBarCode() {
        return goodsBarCode;
    }
    public void setGoodsBarCode(String goodsBarCode) {
        this.goodsBarCode = goodsBarCode;
    }
    public String getRangeStr() {
        return rangeStr;
    }
    public void setRangeStr(String rangeStr) {
        this.rangeStr = rangeStr;
    }
    public Double getTagPrice() {
        return tagPrice;
    }
    public void setTagPrice(Double tagPrice) {
        this.tagPrice = tagPrice;
    }
    public Double getRetailPrice() {
        return retailPrice;
    }
    public void setRetailPrice(Double retailPrice) {
        this.retailPrice = retailPrice;
    }
    public String getUnit() {
        return unit;
    }
    public void setUnit(String unit) {
        this.unit = unit;
    }
    public String getYear() {
        return year;
    }
    public void setYear(String year) {
        this.year = year;
    }
    public String getSeason() {
        return season;
    }
    public void setSeason(String season) {
        this.season = season;
    }
    public Integer getApplySex() {
        return applySex;
    }
    public void setApplySex(Integer applySex) {
        this.applySex = applySex;
    }
    public Double getWholeSalePrice() {
        return wholeSalePrice;
    }
    public void setWholeSalePrice(Double wholeSalePrice) {
        this.wholeSalePrice = wholeSalePrice;
    }
    public String getGoodsRemark() {
        return goodsRemark;
    }
    public void setGoodsRemark(String goodsRemark) {
        this.goodsRemark = goodsRemark;
    }
    public Long getFirstGoodsCategoryId() {
        return firstGoodsCategoryId;
    }
    public void setFirstGoodsCategoryId(Long firstGoodsCategoryId) {
        this.firstGoodsCategoryId = firstGoodsCategoryId;
    }
    public Long getSecondGoodsCategoryId() {
        return secondGoodsCategoryId;
    }
    public void setSecondGoodsCategoryId(Long secondGoodsCategoryId) {
        this.secondGoodsCategoryId = secondGoodsCategoryId;
    }
    public String getGoodsCategoryPath() {
        return goodsCategoryPath;
    }
    public void setGoodsCategoryPath(String goodsCategoryPath) {
        this.goodsCategoryPath = goodsCategoryPath;
    }
    @Column(columnDefinition="VARCHAR(500) DEFAULT NULL")
    public String getGoodsImage() {
        return goodsImage;
    }
    public void setGoodsImage(String goodsImage) {
        this.goodsImage = goodsImage;
    }

    public Integer getIndexNo() {
        return indexNo;
    }

    public void setIndexNo(Integer indexNo) {
        this.indexNo = indexNo;
    }
}
